<template>
  <div class="manual-upload">
    <div>
      <e-upload
        ref="uploadRef"
        multiple
        :showUploadList="true"
        :before-upload="handleUpload"
        action="//jsonplaceholder.typicode.com/posts/">
        
        <!-- <template #trigger>
          <e-button type="primary">选择文件</e-button>
        </template> -->
        <e-button @click=onUpload>上传文件</e-button>
        <template v-slot:tip>
          <div>
            支持扩展名: .jpeg .jpg .png
          </div>
        </template>
      </e-upload>
    </div>
  </div>
</template>

<script setup>
import { ref, getCurrentInstance } from 'vue';

const { proxy } = getCurrentInstance();
const handleUpload = (file) => {
  return true
}
const uploadRef=ref();

const onUpload=()=>{
  uploadRef.value.handleUploadFiles()
}

</script>

<style>
  .manual-upload{
    display: flex;
    position: relative;
  }
   .upload-click{
     position: absolute;
     left: 88px;
   }
</style>
